<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>fix div ie6</title>
<style>
#box{border:1px solid red;width:300px;height:300px;}
</style>
</head>

<body>
<div id="box">some words</div>
<script>
for(var i=0;i<100;i++)
	document.write('this is a test<br>')
</script>
<script>
var $ = function(id){return document.getElementById(id)}
var ie6 = !window.XMLHttpRequest
var box = $('box')
box.style.position = ie6 ? 'absolute' : 'fixed'
box.style.right = '5px'
box.style.bottom = '5px'
if(ie6)window.onscroll = function(){box.className = box.className}
</script>
</body>
</html>
